#pragma once

#include <boost/asio/ssl.hpp>

#include "util/fs.h"

#include "http-server.h"


class HttpServerOnSSL : public HttpServer {
public:
	HttpServerOnSSL(IOContext &context, uint16_t port, HttpDispatcher &dispatcher, const fs::path &cert, const fs::path &key);

	virtual ~HttpServerOnSSL();

protected:
	virtual std::unique_ptr<HttpSession> createSession(tcp::socket &&socket) override;

private:
	std::string getPasswd() const;

private:
	boost::asio::ssl::context sslContext_;
};
